<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head></h:head>
<h:body>
	<ui:composition template="/template.xhtml">
		<ui:define name="corpo">
			<h:form id="formAlterarSenha2">									
				<p:panel header="Alterar senha">
					<p:messages id="messages" showDetail="true" autoUpdate="true"/> 
					
					<p:panelGrid columns="2" id="compararSenha">
						<h:outputLabel for="pwd1" value="Nova senha: *" />  
				           <p:password id="pwd1" value="#{usuarioBean.novaSenha}" match="pwd2" label="Nova Senha" required="true" feedback="true"   
	                       promptLabel="Digite a nova senha" weakLabel="Senha fraca"  
	                       goodLabel="Boa senha" strongLabel="Senha forte"/>  
				  
				           <h:outputLabel for="pwd2" value="Confirme a senha: *" />  
				           <p:password id="pwd2" value="#{usuarioBean.novaSenha}" label="Confirmar nova senha" required="true" promptLabel="Digite a nova senha"/>
				            
				           <p:commandButton id="salvarSenha" update="compararSenha" value="Alterar senha" action="#{usuarioBean.alterarSenha}"/>
					</p:panelGrid>
				</p:panel>				
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>